Skip to content

refactor: parallelize push release workflow#312

Merged
ModerRAS merged 2 commits intomasterfrom
fix/release-full-package
Apr 24, 2026
Merged

refactor: parallelize push release workflow#312
ModerRAS merged 2 commits intomasterfrom
fix/release-full-package

Conversation

@ModerRAS
Copy link
Copy Markdown
Owner

@ModerRAS ModerRAS commented Apr 23, 2026

Summary

  • upload a full win-x64 package zip and checksum to GitHub Releases during master publishes
  • remove existing Backblaze B2 versions for overwritten release files before re-uploading them
  • document the GitHub Releases full-package fallback in the README and build guide

Summary by CodeRabbit

  • New Features

    • Full Windows x64 package archives now available on GitHub Releases for manual deployment and rollback support.
  • Documentation

    • Updated quick-start guide with manual full-package deployment option.
    • Enhanced auto-update configuration documentation detailing release artifact availability.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@ModerRAS has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 48 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 48 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c2e01aea-6083-4cfb-967b-485a59f4f400

📥 Commits

Reviewing files that changed from the base of the PR and between d8c11e6 and 56d7d09.

📒 Files selected for processing (2)
  • .github/workflows/push.yml
  • Docs/Build_and_Test_Guide.md
📝 Walkthrough

Walkthrough

The release workflow now generates a versioned tag based on build date, packages standalone artifacts into a zip file with SHA-512 checksum, cleans up previous versioned objects from B2 storage, and publishes the packaged release to GitHub Releases with appropriate metadata and overwrite settings.

Changes

Cohort / File(s) Summary
CI/CD Workflow Release Enhancement
.github/workflows/push.yml
Added contents: write permission, implemented versioned release tagging (vyyyy.MM.dd.<run_number>), artifact packaging into zip format with checksum generation, B2 storage cleanup logic for versioned objects (packages, updater executable, catalog), and GitHub Release publishing with artifact uploads and configurable overwrite behavior.
Documentation Updates
Docs/Build_and_Test_Guide.md, README.md
Updated release process documentation to reference new full-package zip artifact (TelegramSearchBot-win-x64-full-<version>.zip) published to GitHub Releases, including notes about manual deployment and rollback capabilities.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through workflows grand,
Versioned tags now firmly planned,
Zip it up with checksums tight,
Clean the old, release the new delight!
From B2 to GitHub's stage it springs,
Oh what automation brings! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: publish full release package' clearly summarizes the main change: adding full package publication to GitHub Releases, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-full-package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

🔍 PR检查报告

📋 检查概览

🧪 测试结果

平台 状态 详情
Ubuntu 🟢 成功 测试通过,产物已上传
Windows 🟢 成功 测试通过,产物已上传

📊 代码质量

  • ✅ 代码格式化检查
  • ✅ 安全漏洞扫描
  • ✅ 依赖包分析
  • ✅ 代码覆盖率收集

📁 测试产物

  • 测试结果 artifacts 数量: 2
  • 代码覆盖率已上传到Codecov

🔗 相关链接


此报告由GitHub Actions自动生成

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/push.yml (1)

227-271: Minor: helper functions are sound; small robustness suggestion.

Test-B2UriHasVersions relies on b2 ls --json --versions returning an empty string or empty array when the path has no versions. If b2 returns a non-zero exit with error text on stderr, the function still returns $false (which is what you want). Two small nits:

  • ConvertFrom-Json on a single-object JSON payload returns a PSCustomObject, not an array, so @($items).Count correctly coerces — OK as written.
  • b2 rm --versions --fail-fast will abort mid-batch on the first error; consider whether that's the desired behavior vs. --no-fail-fast for best-effort cleanup when re-running after a partial prior failure. Not blocking.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/push.yml around lines 227 - 271, Test-B2UriHasVersions
currently just checks stdout and can mask a non-zero b2 exit; capture both
stdout and stderr and check $LASTEXITCODE after invoking b2 in
Test-B2UriHasVersions (e.g., run b2 `@arguments` 2>&1 into a variable and return
$false if $LASTEXITCODE -ne 0), and in Remove-B2FileVersions and
Remove-B2DirectoryVersions replace the --fail-fast flag with --no-fail-fast so
b2 rm continues best-effort through a batch instead of aborting on the first
error.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/push.yml:
- Around line 273-288: The pre-upload deletion calls Remove-B2DirectoryVersions
and Remove-B2FileVersions create an outage and destroy rollback history; change
the workflow so you do NOT wipe all versions before uploading: either (A) remove
those Remove-B2* calls entirely and rely on a B2 bucket lifecycle rule (keepDays
or keepLastN) to prune old versions, or (B) move version cleanup to after
successful b2 sync / b2 upload-file and only delete versions older than the
newly uploaded file (preserve at least N recent versions), and then update the
Docs/Build_and_Test_Guide.md guidance accordingly; implement one of these
strategies and remove the pre-upload full-delete logic that currently runs
before b2 sync and b2 upload-file.
- Around line 181-183: The checksum file currently contains only the digest;
update the Set-Content call so it writes "<hash>  <filename>" (two spaces)
instead of just $hash. Use the existing $hash and $packagePath variables and get
the filename via Split-Path -Leaf (or
[System.IO.Path]::GetFileName($packagePath)), e.g. Set-Content -Path $hashPath
-Value ("$hash  " + (Split-Path $packagePath -Leaf)) -Encoding ascii, so
sha512sum -c will verify correctly.

---

Nitpick comments:
In @.github/workflows/push.yml:
- Around line 227-271: Test-B2UriHasVersions currently just checks stdout and
can mask a non-zero b2 exit; capture both stdout and stderr and check
$LASTEXITCODE after invoking b2 in Test-B2UriHasVersions (e.g., run b2
`@arguments` 2>&1 into a variable and return $false if $LASTEXITCODE -ne 0), and
in Remove-B2FileVersions and Remove-B2DirectoryVersions replace the --fail-fast
flag with --no-fail-fast so b2 rm continues best-effort through a batch instead
of aborting on the first error.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c24f96ed-8b00-4d43-a116-f9322bd7f0c0

📥 Commits

Reviewing files that changed from the base of the PR and between cfc0919 and d8c11e6.

📒 Files selected for processing (3)
  • .github/workflows/push.yml
  • Docs/Build_and_Test_Guide.md
  • README.md

Comment thread .github/workflows/push.yml Outdated
Comment thread .github/workflows/push.yml
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ModerRAS ModerRAS merged commit 5dba615 into master Apr 24, 2026
5 checks passed
@ModerRAS ModerRAS deleted the fix/release-full-package branch April 24, 2026 00:34
@ModerRAS ModerRAS changed the title fix: publish full release package refactor: parallelize push release workflow Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant